﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zocono.WCS.Domain.EntityInfo;
using Zocono.WCS.Infrastructure.ApllicationDto.DtoUser;

namespace Zocono.WCS.Domain.DomainRepository
{
    public interface IUserRepository : IRepository<UserInfo>
    {
        Task<List<UserInfoDto>> GetAllUserInfoAsync(QueryUserDto where);

        Task<bool> InitPasswordAsync(List<string> userNames);

        Task<UserInfo> LoginAsync(string userName, string password);

        Task<bool> UpdateUserInfoAsync(UserInfo userInfo);

        Task<bool> UpdatePasswordAsync(long id, string newPassword);

        Task<bool> DeleteUserInfoAsync(long userID);

        // <summary>
        /// 查询用户名是否存在
        /// </summary>
        /// <param name="userName">true 存在</param>
        /// <returns></returns>
        Task<bool> LoginCheckUserNameAsync(string userName);

    }
}
